package liurong.driver.properties;

import java.io.StringReader;
import java.util.Enumeration;
import java.util.Properties;

import org.junit.Test;

public class PropertiesTest {
	@Test
	public void test1() throws Exception {
		// Properties properties = new Properties();
		//
		// properties.load(new StringReader(
		// "#rocketmq的数据源信息 \r\n
		// rocket_host=172.30.221.90:9876\r\n#rocket_topic=buriedpoint\r\nrocket_topic=buriedpoint"));
		// System.out.println(properties);
		// System.out.println(properties.getProperty("rocket_host"));

		Properties properties = System.getProperties();
		Enumeration<Object> keys = properties.keys();
		while (keys.hasMoreElements()) {
			Object object = (Object) keys.nextElement();
			System.out.println(object + "=" + properties.getProperty(object.toString()));
		}
	}
}
